home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 04 - 1988 / 04.10 Oct 88 / MSSourcesLong / MSPROC1.C < prev    next >
Encoding:
C/C++ Source or Header  |  1988-01-20  |  602 b   |  31 lines  |  [TEXT/EDIT]

  1. #Options +B +E -G -H +J +K +Z
  2. #asm
  3. .verbose
  4. #endasm
  5. #include "MyTools.p"
  6. #include "MS.h"
  7. //============================
  8. MSPROC1(theMSP,menuID,itemNumber,flg)
  9.     MSPtr                theMSP;
  10.     short                menuID;
  11.     short                itemNumber,flg;
  12. //=========================
  13. BEGIN_FCT
  14.     int                i;
  15.     short                limTab[2],fontNum;
  16.     Str255            fontName;
  17.  
  18.     IF (NOT MSParsePROC(theMSP,0,&limTab[0]))
  19.     THEN
  20.         return (_MSMIVTER-1);
  21.     ELSE
  22.         FOR (i=limTab[0];i LE limTab[1];i++)
  23.             GetItem(theMSP->MH,i,&fontName);
  24.             GetFNum(&fontName,&fontNum);
  25.             *((long *)(*theMSP->MIVTH)+i)=fontNum;
  26.         ENDFOR
  27.         return (_MSMIVTOK);
  28.     ENDIF
  29. END_FCT
  30. main()
  31. {}